<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 接收 obj参数
        // console.log(window.location.search);
    let str = window.location.search.substr(1);
    // console.log(str);
    let arr = str.split("&");
    // console.log(arr);
    let obj = {};
    arr.forEach(item=>{
        let line = item.split("=");
        // console.log(line);
        obj[line[0]] = line[1];
    })
    console.log(obj);



    </script>
</body>
</html>